extends cmslayout
block header
  title #{title} - #{portal.title}
block content
  .layui-container.mt-20
    .layui-row.layui-col-space20
      .layui-col-md12
        .card.p-15
          span.layui-breadcrumb.p-20
            a(href="/") 首页
            a
             cite #{portal.articlestitle}
        .layui-row.layui-col-space15
          each article in articles
            .layui-col-md4
              .card.md0
                .card-body
                  a(href="/article/#{article._id}") 
                    h2.article-title(title="#{article.title}") #{article.title}
                  - var content = article.content.replace(/<[^>]+>/g,"");
                  if content.length > 60
                    - content = content.substr(0, 60) + "...";
                  p.article-description #{content}
                  a.layui-btn.layui-btn-radius.layui-btn-normal.mt-15(href="/article/#{article._id}") 点击阅读    
        nav.pages
          if( pages> 1)
            ul.pagination
              != createPagination(pages, page)